<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%> 
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<c:set var="ctx" value="${pageContext.request.contextPath }" />
<jsp:include page="../inc.jsp" /> 
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>		
</head>
<body>
	<style type="text/css">
		table#formTb tr{
			height: 30px;
			border-bottom: 1px solid #d4d4d4;
			margin: 5px;
		}
		table#formTb tr td:first-child{
			text-align: right;
		}	
		table#formTb tr td{
			padding: 10px 3px;
		}
	</style>
	<script type="text/javascript">
		$(function(){
			var val =  $('input[name="iotype"]:checked').val();
			if(val!='undefined'){
				getCombobox(val);
			}
			$('input[name="iotype"]').click(function(){
				val =  $('input[name="iotype"]:checked').val();
				getCombobox(val);
			});
		});
		function getCombobox(val){
			$('#detatype').combobox({
				url:'${ctx}/ftc/find/'+val+'.coc',    
			    valueField:'name',    
			    textField:'name'
			});
		}
	</script>
	<form id="dataForm">
				<input type="hidden" name="id" value="${fin.id}">		  
		        <table id="formTb" width="100%">
					<tr>
						<td>类型:</td>
						<td>
							<input type="radio" name="iotype" value="0" <c:if test="${fin.iotype eq '0' or fin.iotype == '0' or empty fin.iotype}">checked</c:if>>收入 
							<input type="radio" name="iotype" value="1" <c:if test="${fin.iotype == '1' or fin.iotype eq '1'}">checked</c:if>>支出
						</td>
					</tr>
					<tr>
						<td width="100px">详细类型:</td>
						<td>
							<input id="detatype" class="easyui-combobox" name="detaType"  value="${fin.detaType}"/>
						</td>
					</tr>
					<tr>
						<td>金额:</td>
						<td>
							<input class="easyui-numberbox" name="amount" value="${fin.amount}" data-options="precision:2"/>
						</td>
					</tr>
					<tr>
						<td>时间:</td>
						<td>
							<input class="easyui-datebox" enable=false id="birthday" name="createDate" value="${fin.bir}">
						</td>
					</tr>
					<tr>
						<td>负责人:</td>
						<td>
							<input class="easyui-textbox" name="responseMen" value="${fin.responseMen}" />
						</td>
					</tr>
					<tr>
						<td>备注:</td>
						<td>
							<input class="easyui-textbox" multiline=true name="content" value="${fin.content}" style="height: 100px;width: 170px" >
						</td>
					</tr>
				</table>  
	</form>
</body>
</html>